-----------------------------------------------------------------------------------------------------------------------
       log:  Z:\interactionmodels\addresults\presidentialfig.log
  log type:  text
 opened on:  10 Jan 2007, 20:36:22

. #delimit ;
delimiter now ;
. *     ***************************************************************** *;
. *     ***************************************************************** *;
. *       File-Name:      presidentialfig.do                              *;
. *       Date:           01/09/2007                                      *;
. *       Author:         MRG                                             *;
. *       Purpose:        Provide figure for effect of presidentialism    *;
. *       Input File:     STATA_mozaffar.dta                              *;
. *       Output File:    presidentialfig.do                              *;
. *       Data Output:    none                                            *;
. *       Previous file:                                                  *;
. *       Machine:                                                        *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. set mem 10m;
(10240k)

. use getdata\STATA_mozaffar.dta;

. *     ****************************************************************  *;
. *                  Presidential Figure for Electoral Parties            *;
. *     ****************************************************************  *;
. regress elecparties  fragmentation concentration logmag10 frag_conc logmag10_frag  
> logmag10_conc logmag10_frag_conc proximity prescandidate prox_prescandidate, robust;

Regression with robust standard errors                 Number of obs =      62
                                                       F( 10,    51) =    4.39
                                                       Prob > F      =  0.0002
                                                       R-squared     =  0.6908
                                                       Root MSE      =  1.6418

------------------------------------------------------------------------------
             |               Robust
 elecparties |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.6497941   .3319545    -1.96   0.056     -1.31622    .0166323
concentrat~n |  -.0599409   .5795809    -0.10   0.918    -1.223498    1.103616
    logmag10 |  -.8498961   1.193188    -0.71   0.480     -3.24532    1.545528
   frag_conc |   .2194089   .1416935     1.55   0.128    -.0650527    .5038705
logmag10_f~g |    .039693   .2514025     0.16   0.875    -.4650185    .5444046
logmag10_c~c |  -.8953552   .7152575    -1.25   0.216    -2.331295    .5405841
~0_frag_conc |    .287927   .1620678     1.78   0.082    -.0374378    .6132917
   proximity |  -.2259049   .8774362    -0.26   0.798    -1.987432    1.535622
prescandid~e |   1.038526   .4829355     2.15   0.036     .0689929     2.00806
prox_presc~e |  -.0840906   .5706311    -0.15   0.883     -1.22968    1.061499
       _cons |   2.182352   .7266127     3.00   0.004     .7236166    3.641088
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (PRESCANDIDATE) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>80;
(0 real changes made)

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb5b6=V[5,6];

. scalar covb6b7=V[6,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b7=V[5,7];

. scalar covb8b10=V[8,10];

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for proximity   *;
. *     ****************************************************************  *;
. gen conb=b8+b10*JH if _n<80;

. set more off;

. list conb in 1/20;

     +-----------+
     |      conb |
     |-----------|
  1. | -.2259049 |
  2. |  -.234314 |
  3. | -.2427231 |
  4. | -.2511321 |
  5. | -.2595412 |
     |-----------|
  6. | -.2679503 |
  7. | -.2763593 |
  8. | -.2847684 |
  9. | -.2931775 |
 10. | -.3015865 |
     |-----------|
 11. | -.3099956 |
 12. | -.3184046 |
 13. | -.3268137 |
 14. | -.3352228 |
 15. | -.3436318 |
     |-----------|
 16. | -.3520409 |
 17. |   -.36045 |
 18. |  -.368859 |
 19. | -.3772681 |
 20. | -.3856772 |
     +-----------+

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse=sqrt(varb8+varb10*JH^2+2*covb8b10*JH)  if _n<80;

. set more off;

. *     ****************************************************************  *;
. *               Generate confidence intervals at the 95% level          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. gen a=2.01*conse;

. gen top=conb+a;

. gen bottom=conb-a;

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of proximity on electoral parties conditional  *;
. *       on the number of presidential candidates                        *;
. *     ****************************************************************  *;
. graph twoway   line conb JH, clwidth(medium) clcolor(blue) clcolor(black)
>         ||  line top  JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  line bottom JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  ,   
>             xlabel(0 1 2 3 4 5 6, labsize(2.5)) 
>             ylabel(5 0 5  , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) label(1 "Estimated Causal Effect of Proximity") label(2 "95% Confidence Interval
> ") 
>                   label(3 " "))
>         yline(0, lcolor(black)) yline(-5 5, lcolor(white))  
>             title("Estimated Causal Effect of Temporally-Proximate Presidential Elections", size(4))
>             subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " ", size(3))
>             xtitle(Effective Number of Presidential Candidates, size(3)  )
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>             ytitle("Estimated Causal Effect of Proximity", size(3))
>         scheme(s2mono) graphregion(fcolor(white));

. drop JH conb top bottom a conse;

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\proximity.wmf, replace;
(note: file addresults\proximity.wmf not found)
(file Z:\interactionmodels\addresults\proximity.wmf written in Windows Metafile format)

. *     ****************************************************************  *;
. *       Proximity never has a significant effect on the number of       *;
. *       electoral parties.                                              *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *                  Presidential Figure for Legislative Parties          *;
. *     ****************************************************************  *;
. regress legparties  fragmentation concentration logmag10 frag_conc logmag10_frag  
> logmag10_conc logmag10_frag_conc proximity prescandidate prox_prescandidate, robust;

Regression with robust standard errors                 Number of obs =      62
                                                       F( 10,    51) =   18.12
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7566
                                                       Root MSE      =  .81255

------------------------------------------------------------------------------
             |               Robust
  legparties |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.3061517   .1244102    -2.46   0.017    -.5559156   -.0563877
concentrat~n |   .1077863   .2720849     0.40   0.694    -.4384468    .6540195
    logmag10 |   .6576745   .4536982     1.45   0.153    -.2531626    1.568512
   frag_conc |   .1468926   .0486345     3.02   0.004     .0492546    .2445305
logmag10_f~g |   -.072974   .1039821    -0.70   0.486    -.2817268    .1357788
logmag10_c~c |  -.8640806   .3508728    -2.46   0.017    -1.568487    -.159674
~0_frag_conc |     .17936   .0804572     2.23   0.030     .0178355    .3408846
   proximity |  -.5792874   .4341616    -1.33   0.188    -1.450903    .2923284
prescandid~e |   .4972876   .1789268     2.78   0.008      .138077    .8564981
prox_presc~e |   .0357922   .2703231     0.13   0.895     -.506904    .5784883
       _cons |   1.274294   .3003618     4.24   0.000     .6712925    1.877295
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (PRESCANDIDATE) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>80;
(0 real changes made)

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb5b6=V[5,6];

. scalar covb6b7=V[6,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b7=V[5,7];

. scalar covb8b10=V[8,10];

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for proximity   *;
. *     ****************************************************************  *;
. gen conb=b8+b10*JH if _n<80;

. set more off;

. list conb in 1/20;

     +-----------+
     |      conb |
     |-----------|
  1. | -.5792874 |
  2. | -.5757082 |
  3. |  -.572129 |
  4. | -.5685497 |
  5. | -.5649705 |
     |-----------|
  6. | -.5613913 |
  7. |  -.557812 |
  8. | -.5542328 |
  9. | -.5506536 |
 10. | -.5470744 |
     |-----------|
 11. | -.5434952 |
 12. |  -.539916 |
 13. | -.5363368 |
 14. | -.5327575 |
 15. | -.5291783 |
     |-----------|
 16. | -.5255991 |
 17. | -.5220199 |
 18. | -.5184407 |
 19. | -.5148615 |
 20. | -.5112823 |
     +-----------+

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse=sqrt(varb8+varb10*JH^2+2*covb8b10*JH)  if _n<80;

. set more off;

. *     ****************************************************************  *;
. *               Generate confidence intervals at the 95% level          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. gen a=2.01*conse;

. gen top=conb+a;

. gen bottom=conb-a;

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of proximity on Legislative Parties            *;
. *       conditional on the number of presidential candidates            *;
. *     ****************************************************************  *;
. graph twoway   line conb JH, clwidth(medium) clcolor(blue) clcolor(black)
>         ||  line top  JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  line bottom JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  ,   
>             xlabel(0 1 2 3 4 5 6, labsize(2.5)) 
>             ylabel(5 0 5  , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) label(1 "Estimated Causal Effect of Proximity") label(2 "95% Confidence Interval
> ") 
>                   label(3 " "))
>         yline(0, lcolor(black)) yline(-5 5, lcolor(white))  
>             title("Estimated Causal Effect of Temporally-Proximate Presidential Elections", size(4))
>             subtitle(" " "Dependent Variable: Effective Number of Legislative Parties" " ", size(3))
>             xtitle(Effective Number of Presidential Candidates, size(3)  )
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>             ytitle("Estimated Causal Effect of Proximity", size(3))
>         scheme(s2mono) graphregion(fcolor(white));

.                drop JH conb top bottom a;

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\proximity2.wmf, replace;
(file Z:\interactionmodels\addresults\proximity2.wmf written in Windows Metafile format)

. *     ****************************************************************  *;
. *   Proximity has a negative and significant effect on the number of    *;
. *   legislative parties so long as the number of presidential           *;
. *   candidates is between 0.9 and 1.7. 18 observations out of 62 fall   *;
. *   in this range.                                                      *;
. *     ****************************************************************  *;
. log close;
       log:  Z:\interactionmodels\addresults\presidentialfig.log
  log type:  text
 closed on:  10 Jan 2007, 20:36:30
-----------------------------------------------------------------------------------------------------------------------
